// const {}=require("graphql-yoga");
import { GraphQLServer } from 'graphql-yoga'
import resolvers from './resolvers'
import { prisma } from './generated/prisma-client';
const server = new GraphQLServer({
    typeDefs: './src/schema.graphql',
    resolvers,
    context:{
        prisma
    }
})
server.start({
    //还有其他配置项(包含文件上传)： https://github.com/prisma/graphql-yoga
    // playground:false
    // playground:"/aaa"

    // port:4600  不写默认4000
}, ({ port }) => {
    console.log(`服务已启动，请访问：http://localhost:${port}`);
})